"""Build versioned extent allocator tests"""
import daos_build

def scons():
    """Execute build"""
    Import('denv', 'prereqs')

    denv.Append(CPPDEFINES=['-DDAOS_PMEM_BUILD'])
    libraries = ['smd', 'pmemobj', 'cmocka', 'daos_common_pmem',
                 'uuid', 'abt', 'gurt']
    tenv = denv.Clone()

    prereqs.require(tenv, 'argobots')

    tenv.AppendUnique(LIBPATH=['..'])
    smd_ut = daos_build.test(tenv, 'smd_ut', 'smd_ut.c', LIBS=libraries)
    tenv.Install('$PREFIX/bin/', smd_ut)

if __name__ == "SCons.Script":
    scons()
